package cn.lab.controller;

import cn.lab.dataobject.UserDO;
import cn.lab.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/one")
@Slf4j
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/getUser")
    @ResponseBody
    public UserDO selectUserById(Integer id) {
        log.error("不会出错的");
        return userService.selectUserById(id);
    }
}
